package com.anttribe.components.db.metadata.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * 数据表
 *
 * @author zhaoyong
 * @date 2020-12-13
 */
@Getter
@Setter
@ToString
public class DbTable {

    /**
     * 所属schema
     */
    @ToString.Exclude
    private DbSchema dbSchema;

    /**
     * 表名
     */
    private String tableName;

    /**
     * 注释说明
     */
    private String comment;

    /**
     * 类型: 表
     */
    private DbObjectType type = DbObjectType.TABLE;

    /**
     * 列
     */
    private List<DbColumn> columns;

    /**
     * 主键
     */
    private PrimaryKey primaryKey;

    /**
     * 数据库索引
     */
    private List<DbIndex> indexes;

    public DbTable() {
    }

}
